from django.contrib import admin
from s_server.models import *

# admin.py

from django.contrib import admin


class CodesAdmin(admin.ModelAdmin):
    list_display = ('dm', 'mc', 'jys')
    fieldsets = [
        ('Group 1', {'fields': ['dm', 'mc']}),
        ('Group 2', {'fields': ['jys'], 'classes': ['collapse']}),
    ]


class RecordsAdmin(admin.ModelAdmin):
    list_display = ('d', 'o', 'h', 'l', 'c', 'v', 'e', 'zf', 'hs', 'zd', 'zde')
    fieldsets = [
        ('Group 1', {'fields': ['d']}),
        ('Group 2', {'fields': ['o', 'h', 'l', 'c', 'v'], 'classes': ['collapse']}),
        ('Group 3', {'fields': ['e', 'zf', 'hs', 'zd', 'zde'], 'classes': ['collapse']}),
    ]


admin.site.register(Codes, CodesAdmin)
admin.site.register(Record, RecordsAdmin)
